<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Cate extends Model
{
    //
    public function norms()
    {
        return $this->hasMany("\App\Norm");
    }

    public function goods()
    {
        return $this->hasMany("\App\Goods");
    }

    public function hotGoods()
    {
        return $this->goods()->where("is_hot",1);
    }
}
